# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=ddnrs
pkgver=0.2.1
pkgrel=0
pkgdesc="A simple tool to update dns records to match your current IP"
url="https://codeberg.org/Kladky/ddnrs"
arch="all"
license="AGPL-3.0-only"
makedepends="
	make
	cargo
	cargo-auditable
	openssl-dev
	"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/Kladky/ddnrs/archive/$pkgver.tar.gz"
options="!check" # no tests
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	CARGO="cargo auditable" make build-frozen
}

package() {
	DESTDIR="$pkgdir" make install
	DESTDIR="$pkgdir" make install-openrc
}

sha512sums="
e8c48f9f26af61279abb1a7d9fab30ad9c72b28131425a2715cf4e62e7a1d60524c93df03395dd614a92de2e0422e6991340654881e84e8b3aca5cff99bf97fb  ddnrs-0.2.1.tar.gz
"
